#include "thread.h"

typedef struct word_s{
    char name[256];
}word_t;
int get_user_dir(char*pwd,dirID_t* dirID){

    word_t word[256];

    bzero(word,sizeof(word));
    int i=0;
    dirNode_t *curNode=dirID->userID.pFornt;
    while(curNode){
        strcpy(word[i].name,curNode->dirName);
        curNode=curNode->pNext;
        i++;
    }

    for(i;i>=0;i--){  
        strcat(pwd,word[i].name);
        strcat(pwd,"/");
    } 
    int len=strlen(pwd);
    pwd[len-1]='\0';
    printf("getpwd = %s\n",pwd);
}
